<?php
class GoodsRecycleCashierAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT
    );

    /**
     * 回收收银台金币
     *
     * @param int $userId
     * @param int $reqTime
     * @return SzResponse
     */
    public function execute($userId, $reqTime)
    {
        GameService::get()->validateMultiRequestTimeDelta($userId, $reqTime);

        /**
         * @var GoodsVo $profile
         * @var ModuleProfileInfoVoList $profileInfoList
         */
        list($profile, $profileInfoList) = GoodsService::get()->recycleCashier($userId);
        return $this->buildResponse(array(
            'goods' => $profile->toArray(),
            'profileInfoList' => $profileInfoList->toArray()
        ));
    }
}